import request from '@/utils/request'

// 查询还款单列表
export function listPaymentOrder(query) {
  return request({
    url: '/finance/paymentOrder/list',
    method: 'post',
    data: query
  })
}

// 查询还款单详细
export function getPaymentOrder(id) {
  return request({
    url: '/finance/paymentOrder/' + id,
    method: 'get'
  })
}

// 新增还款单
export function addPaymentOrder(data) {
  return request({
    url: '/finance/paymentOrder/add',
    method: 'post',
    data: data
  })
}

// 修改还款单
export function updatePaymentOrder(data) {
  return request({
    url: '/finance/paymentOrder/update',
    method: 'post',
    data: data
  })
}

// 删除还款单
export function delPaymentOrder(id) {
  return request({
    url: '/finance/paymentOrder/delete/' + id,
    method: 'post'
  })
}

export function initFinancePaymentOrderDto(ids){
  return request({
    url: '/finance/paymentOrder/initFinancePaymentOrderDto/',
    method: 'post',
    data: ids
  })
}

export function auditFinancePaymentOrder(id){
  return request({
    url: '/finance/paymentOrder/audit/'+id,
    method: 'post'
  })
}

export function auditCancelFinancePaymentOrder(id){
  return request({
    url: '/finance/paymentOrder/auditCancel/'+id,
    method: 'post'
  })
}

export function closeFinancePaymentOrder(id){
  return request({
    url: '/finance/paymentOrder/close/'+id,
    method: 'post'
  })
}